/*--------------------------------------------------------------------------------------*\
**
** skeleton_transformer_window.h
**
** Heroes IV
** Copyright 2001, The 3DO Company
**
\*--------------------------------------------------------------------------------------*/

#ifndef SKELETON_TRANSFORMER_WINDOW_H_INCLUDED
#define SKELETON_TRANSFORMER_WINDOW_H_INCLUDED

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

// kill the 255+ character identifier warning.  Templates tend to exceed that easily.
#pragma warning( disable: 4786 )

#include "vector"

#include "bitmap_group_ptr.h"
#include "bitmap_layer_window_ptr.h"
#include "game_window.h"
#include "toggle_button_ptr.h"
#include "text_window_ptr.h"

class t_army;
class t_button;
class t_creature_array;
class t_creature_select_window;
class t_creature_stack;
class t_town;

typedef std::vector<t_bitmap_layer_window*> t_bitmap_layer_list;

struct t_transformer_window_item
{
    t_toggle_button_ptr     button_ptr;
	t_bitmap_window_ptr     portrait;
	t_window_ptr			inset;
	t_text_window_ptr		text;
};

typedef std::vector<t_transformer_window_item> t_transformer_window_list;

class t_skeleton_transformer_window : public t_window
{

public:
    t_skeleton_transformer_window ( t_window* parent, t_town* town_ptr, t_army *army );

protected:
    t_creature_array *                  m_adjacent_creatures;
    t_transformer_window_list           m_adjacent_window_list;
	t_bitmap_group_ptr		            m_background_bitmaps_ptr;
    t_creature_array *                  m_garrison_creatures;
    t_transformer_window_list           m_garrison_window_list;
	t_creature_select_window*           m_selection_window;
    t_button *                          m_transform_button_ptr;

    void                        close_click( t_button *button_ptr );
    void                        do_transform( t_creature_array *creature_array, int index, t_transformer_window_list &window_list );
    void                        max_click( t_button *button_ptr );
    void                        transform_click( t_button *button_ptr );
};

#endif // SKELETON_TRANSFORMER_WINDOW_H_INCLUDED
